Apple II
Technical Notes
_____________________________________________________________________________
                                                  Developer Technical Support


Apple IIGS
#26:    ROM 2.0 Revision Summary

Revised by:    Matt Deatherage                                  November 1988
Written by:    Rilla Reynolds                                    October 1987

This Technical Note summarizes revisions to the Apple IIGS ROM (part number 
342-0077-B).
_____________________________________________________________________________

Apple IIGS systems with serial numbers E704... and higher ship with the new 
ROM, and you can have older systems upgraded at no cost by an authorized Apple 
dealer.  With the new ROM, you should be using System Disk 2.0 or later since 
applications on older System Disk releases are not guaranteed to run (although 
it is likely they do) due to the coordination of system software enhancements 
and the latest ROM.  For example, System Disk 4.0 has an FFStopSound patch for 
ROM 2.0 which is not needed for ROM 1.0.

ADB

o    Absolute ADB devices are now support correctly.
o    ADB fatal system error code is now $0911 instead of $0400.
o    ADBReset routine now delays about 160 microseconds before reading 
     the buttons.
o    ADBStatus TRUE is now $FFFF instead of $0001.
o    All ADB error codes now include the tool number.
o    SRQrmv no longer crashes when you make the call with a command 
     pending.

AppleDisk 3.5

o    AppleDisk 3.5 Macintosh block reads and writes now work as 
     documented.
o    Extended status call now returns bit 0 = 1 if AppleDisk 3.5 media 
     has been switched since the last READ, WRITE, or FORMAT.
o    New AppleDisk 3.5 status calls have been implemented to get 
     internal variable and work buffer starting addresses.

AppleTalk

o    Link Access Protocol (LAP) inter-packet gap now handles added SCC 
     delay.
o    Name Binding Protocol (NBP) now considers uppercase and lowercase 
     characters identical.
o    A nonexistent protocol no longer hangs the dispatcher.

Desk Manager

o    SaveScreen and RestoreScreen now work.

Event Manager

o    Now auto-key events are not posted in the queue unless the queue 
     is empty.
o    EMStartUp and EMShutDown code has been optimized.
o    Event Manager now returns an error instead of crashing when there 
     is an attempt to post an invalid event.

Integer Math

New Changes:
o    Optimized the multiply routine.
RAM patches moved to ROM:
o    Changes to FixMul, FixRatio, and SDivide.
o    SDivide recovers from a divide by zero operation.
o    New calls:  FracMul, FixDiv, FracDiv, FixRound, FracSqrt, FracCos, 
     FracSin, FixATan2, HiWord, LoWord, Long2Fix, Fix2Long, Fix2Frac, 
     Frac2Fix, Fix2X, Frac2X, X2Fix, X2Frac.

Memory Manager

o    Optimized Purge and Compact for banks 0 and 1 and moved from RAM 
     to ROM.
o    RAM patches and enhancements moved to ROM.
o    RAMdisk now returns bytes transferred count on DIB call.
o    SetHandleSize makes a handle temporarily unpurgable while changing 
     handle size.

Miscellaneous Tools

RAM patches and enhancements moved to ROM:
o    AbsClamp fixes.
o    Battery RAM routines work if data bank is set to a bank other than 
     bank data is in.
o    Firmware entry calls now return processor status in high byte 
     instead of low byte.
o    GetAddr with ref number $000E returns SerFlag address for SCC 
     interrupts (useful if not using serial firmware).
o    ID manager can reuse discarded IDs.
o    Keyboard interrupts now enable VBL interrupts.
o    Munger now works with 1-char strings and returns with A=0.
o    New SysBeep call.
o    PackBytes and UnpackBytes return with A=0.
o    ReadBParam and ReadBRAM error codes corrected.
o    WriteBParam and WriteBRAM do not return error codes (this is a 
     documentation change).
o    WriteTimeHex Bad Parameter error code is now $0301.

Monitor

o    80-column screens maintained if break occurs and Pascal protocol 
     in effect.
o    Applesoft tabbing in 80-column mode now works correctly.
o    Control Panel's Maximum RAM Disk Size increased to 8128K instead 
     of 4096K.
o    Firmware version number returned is $01 instead of $00.
o    Interrupts now disabled during paddle read routines.
o    Interrupts re-enabled after fatal system error (for debug DAs).
o    Mouse clamps with positive minimum and negative maximum works 
     (e.g., $6000 min, $8000 max).
o    New monitor command, pound sign (#), installs monitor entry and 
     memory peeker classic desk accessories (unless already installed), 
     accessible via the Control Panel.  Reinstalled automatically on 
     reset;  disabled by power off only.
o    New monitor command, Control-N, clears m, e, and x bits for native 
     mode.  (Control-R still  switches to 8-bit, emulation mode.)
o    RESET entry point at $00FA62 sets state register to $0C and shadow 
     register to $08.
o    Shadowing of the Super Hi-Res area in Bank 1 is no longer enabled 
     automatically.
o    WAIT routine now always exits with C=1.

QuickDraw II

RAM patches and enhancements moved to ROM:
o    640-mode pen masks now work when portRect origin not a multiple of 
     8.
o    Arcs, ovals, and round rects can be drawn across bank boundaries.
o    Changes to round drawing routines: PPToPort, GetFontLore, 
     GetROMFont, and InflateTextBuffer.
o    Current bank bytes 100...106 no longer modified by scaling and 
     mapping calls.
o    FontFlags 1 and 2 added for pen width and color control.
o    FramePoly returns with A=0.
o    GetPort returns all four bytes of GrafPort.
o    HideCursor and ShowCursor work correctly with obscured cursor.
o    MapRgn now works on rectangular regions.
o    Pixel painting routines support QuickDraw Auxiliary Tool Set 
     stretching and shrinking.
o    PPToPort now clips correctly to the current portRect.
o    QDStartUp and QDShutDown save and restore the scan line interrupt 
     vector.
o    RectInRgn bug fixed.
o    ScrollRect works when the ClipRgn and VisRgn are not rectangular.
o    SetSysFont works.
o    StdPixels now returns with A=0 if the pen is not visible.
o    Text underline bug fixed.
o    TextBounds works.
New QuickDraw changes:
o    Busy flag now maintained correctly by ClosePort, OffsetRgn, 
     InsetRgn, KillPoly, FillRect, FrameOval, PaintOval, EraseOval, 
     InvertOval, FillOval, FrameArc, PaintArc, EraseArc, InvertArc, 
     FillArc, FrameRRect, PaintRRect, EraseRRect, InvertRRect, and 
     FillRRect.
o    Cursor appears in correct Super Hi-Res mode as determined by the 
     low byte's bit 7 (320/640) of the MasterSCB.

SANE

o    Elems now can be called from any part of memory.
o    HALT exception jumping through the incorrect vector fixed.
o    Integer overflow during conversion reported.
o    STATUS call moved to ROM.

Scheduler

o    Scheduler now accepts a flush function call.
o    Task-handling RAM patch (on System Disk 1.0 and later) moved to 
     ROM.

Serial I/O

o    First character after an XON is no longer trashed when buffering 
     is not enabled.
o    If serial mode bit 17 = 1, parity and framing error suppression 
     are defeated.
o    Parity, baud, and data format commands work with buffering.
o    STATUS call will not report that a character is ready if the 
     character arrives with a parity or framing error.
o    STATUS call works correctly with XON/XOFF protocol.

SmartPort

o    PR#5, following a PR#5 with I/O error (i.e., no disk in drive), 
     now boots as expected.
o    SmartPort manipulates only Slot 6 motor on detect so the IWM can 
     run in fast mode.

Sound

o    Fixed bug in FFStopSound call.
o    Fixed low-level RAM read/write bug.
o    Interrupts are disabled when the internal bell is active.
o    Interrupts no longer need to be disabled when accessing sound RAM.
o    New sound diagnostics with the following error codes:  $0C00001 = 
     failed RAM data test, $0C00002 = RAM address test, $0C00003 = 
     register data test, and $0C00004 = control register test.
o    Sound Manager RAM patches and enhancements moved to ROM.

Text Tools

RAM patches moved to ROM:
o    RAM patches moved to ROM for Writing and ErrorWriting routines.
o    TextInit Illegal device error now is in 16-bit mode instead of 8.

Tool Locator

o    Optimized tool dispatcher.
o    ROM tools present on a memory expansion card are installed.

